﻿namespace Cmn
{
    using System;
    using System.IO;
    using System.Web;

    public class FileFolder
    {
        public static void CreateFolder(string filePath)
        {
            string[] strArray = filePath.Split(new string[] { "/" }, StringSplitOptions.None);
            string path = strArray[0];
            for (int i = 1; i < strArray.Length; i++)
            {
                path = path + "/" + strArray[i];
                string str2 = HttpContext.Current.Server.MapPath(path);
                if (!Directory.Exists(str2))
                {
                    Directory.CreateDirectory(str2);
                }
            }
        }
    }
}

